package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.entity.Borrow;

import java.util.List;

@Mapper
public interface BorrowMapper {

    @Select("select * from db_borrow where uid = #{uid}")
    List<Borrow> getBorrowByUid(int uid);

    @Select("select * from db_borrow where bid = #{bid}")
    List<Borrow> getBorrowByBid(int bid);

    @Select("select * from db_borrow where uid = #{uid} and bid = #{bid}")
    List<Borrow> getBorrow(int uid,int bid);
}
